The present disclosure relates to multi-axis fonts, and more particularly, to use of multi-axis fonts on a computer device.
Fonts define the visual appearance of glyphs, which have typically been static two dimensional (2D) definitions, or more recently 2D definitions with pre-defined animations. The appearance of text is generally defined by font files (e.g., Calibri, Arial). Traditionally, fonts have been amenable to reuse across various applications. When any application instances a font at a specific size, for example Arial size 12, all the font data that is generated for that font size, Arial size 12 in this example, is shareable across every other application requesting the same font size combination for drawing text, generally by caching the intermediate results. For example, when an application needs to render text, the application may ask a text processing component, such as DirectWrite, to create a font face, if the font face data is cached, DirectWrite returns the requested font face to the application. If the font face is not cached, DirectWrite reads the desired information from the font file, caches the data in the font file, and returns the requested font face to the application, which is ill-suited for animating fonts.
For each unique design axis instance created by the application, DirectWrite computes the font outlines from the font file and updates the font cache. Animations are typically redrawn at about 60 frames per second. So the application animating the text needs to create a large number of font instances. Unlike for the non-varying text case, font instances created for animation have a low probability of cross application reuse. As a result, caching them in the traditional font cache results in a lot of wasted space. An even worse consequence is that perfectly shareable font instances can get evicted as the cache overflows because of the sheer number of font instances that get created for animation.
As such, existing techniques for animating glyphs either require significant frame-over-frame processing time or frame-over-frame storage space, or both. Prior solutions include repeated rendering of different image content, such as in the case of animated graphics interchange format (GIF), which requires both significant processing time to decode each image frame and significant storage space to store the image frames both in memory and persistent storage. In addition, prior solutions are not scalable across the output resolution (e.g., dots per inch, pixels per inch) of a display.
Thus, there is a need in the art for improvements in animated fonts.